package com.mojo.io.stream;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

/**
 * 文件输入流
 *
 * @author <a href="mailto:mojo_jj@163.com">Mojo</a>
 */
public class FileInputStream01 {
    public static void main(String[] args) throws IOException {
        File file = new File("e:\\a.txt");
        FileInputStream inputStream = new FileInputStream(file);
        BufferedInputStream bufferStream = new BufferedInputStream(inputStream);

        byte[] bytes = new byte[1024];
        int read = inputStream.read(bytes);
        System.out.println(new String(bytes));
        inputStream.close();

    }
}
